package com.zhan.drugStore.exception;


import com.zhan.drugStore.enums.ResultEnum;


public class BusinessException extends GlobalException
{
	private static final long serialVersionUID = 2949024697799485186L;

	public BusinessException()
	{
		super();
	}

	public BusinessException(ResultEnum re)
	{
		super(re.getCode(), re.getMessage());
	}

	public BusinessException(ResultEnum re, String message)
	{
		super(re.getCode(), re.getMessage() + ", " + message);
	}

	public BusinessException(ResultEnum re, Throwable cause)
	{
		super(re.getCode(), re.getMessage(), cause);
	}

	public BusinessException(int code, String message)
	{
		super(code, message);
	}

	public BusinessException(String message)
	{
		super(ResultEnum.ERROR.getCode(), message);
	}
}
